﻿<?xml version="1.0" encoding="utf-8" ?>
<AdoNetDataAccess connection="$ArticleDBConnection$"  formatter="bizobj of UserLimits; merged into limits">
	<Sql>
		SELECT COUNT(a.id) AS currentArticleCount,l.limit as maxTotalArticles,@id as id
		FROM  Articles a INNER JOIN ArticleLimit l ON a.authorId = l.id
		WHERE authorId = @id
		GROUP BY L.LIMIT
	</Sql>
	<Param name="id" type="UniqueIdentifier" />
</AdoNetDataAccess>